home *** CD-ROM | disk | FTP | other *** search
- set fork(color) {1 0 0}
- set fork(halfWidth) 2
- set fork(radius) 1
- set fork(cylinderLength) 3
-
- set fork(volumePreservingScaleFactor) 1.0
-
- EveCmd {set fork(xScale) [expr 1./sqrt($fork(volumePreservingScaleFactor))]}
- EveCmd {set fork(yScale) $fork(volumePreservingScaleFactor)}
- EveCmd {set fork(zScale) [expr 1./sqrt($fork(volumePreservingScaleFactor))]}
-
- loadControlPanel controls.nib
-
- startShape Fork
- EveCmd {Color $fork(color)}
- EveCmd {Scale $fork(xScale) $fork(yScale) $fork(zScale)}
- SolidBegin primitive
- # the torus
- EveCmd {Torus $fork(halfWidth) $fork(radius) 0 360 180}
-
- #left (from its pov) disk
- # translate the disk by $torus(majorRadius)
- TransformBegin
- EveCmd {Translate $fork(halfWidth) 0 0 }
- Rotate 90 1 0 0
- EveCmd {Cylinder $fork(radius) 0 $fork(cylinderLength) 360}
- TransformEnd
- TransformBegin
- EveCmd {Translate $fork(halfWidth) 0 0 }
- Rotate 90 1 0 0
- # Make the height of the disk == the zMax of the cylinder and the radius equal to the cylinder's
- EveCmd {Disk $fork(cylinderLength) $fork(radius) 360}
- TransformEnd
-
- #right (from its pov) disk
- # translate the disk by $torus(majorRadius)
- TransformBegin
- EveCmd {Translate [expr {-1 * $fork(halfWidth)}] 0 0 }
- Rotate 90 1 0 0
- EveCmd {Cylinder $fork(radius) 0 $fork(cylinderLength) 360}
- TransformEnd
- TransformBegin
- EveCmd {Translate [expr {-1 * $fork(halfWidth)}] 0 0 }
- Rotate 90 1 0 0
- # Make the height of the disk == the zMax of the cylinder and the radius equal to the cylinder's
- EveCmd {Disk $fork(cylinderLength) $fork(radius) 360}
- TransformEnd
- SolidEnd
- endShape
-
-
-